#!/bin/bash

DB_BACK_PATH="/opt/data/dbbak"
mysqldump -h 10.103.13.14 -uapi -pyouku mobile_production s_os > $DB_BACK_PATH/s_os.sql
mysqldump -h 10.103.13.14 -uapi -pyouku mobile_production s_factory > $DB_BACK_PATH/s_factory.sql
mysqldump -h 10.103.13.14 -uapi -pyouku mobile_production s_partner_new > $DB_BACK_PATH/s_partner_new.sql

mysql -h 10.103.13.103 -uroot -p1qaz2wsx3edc mobile_production < $DB_BACK_PATH/s_os.sql
mysql -h 10.103.13.103 -uroot -p1qaz2wsx3edc mobile_production < $DB_BACK_PATH/s_factory.sql
mysql -h 10.103.13.103 -uroot -p1qaz2wsx3edc mobile_production < $DB_BACK_PATH/s_partner_new.sql
